package com.hysf.controller;

import com.hysf.entity.Product;
import com.hysf.service.ProductService;
import com.hysf.service.impl.ProductServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

public class CategoryContoller extends Base {
    ProductService service =new ProductServiceImpl();

    /**
     *
     * @Description:
     *
     * @Author: 石涛
     * @Date: 2024/4/9 10:51
     **/
    public void categoryshow(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String categoryId = req.getParameter("categoryId");
        List<Product> categorys9 = service.cshow(categoryId);
        req.setAttribute("categorys9", categorys9);

        req.getRequestDispatcher("/catlist.jsp").forward(req, resp);
    }

}

